include(cc_library)
include(cc_test)


cc_library(
  NAME
    npu_layers 
  HDRS
    npu_word_embedding_impl.h
    npu_pos_embedding_impl.h
    npu_lm_head_impl.h
    npu_qwen2dot5_vision_encoder_layer_impl.h
    npu_qwen3_vision_encoder_layer_impl.h
    npu_qwen3_moe_decoder_layer_impl.h
    # atb_parallel_linear.h
    npu_block_copy_impl.h
    buffer/atb_buffer.h
    buffer/atb_workspace.h
    npu_base_layer.h
    npu_column_parallel_linear_impl.h
    npu_glm4_moe_decoder_layer.h
    npu_deepseek_v2_decoder_layer_impl.h
    npu_llama_decoder_layer_impl.h
    npu_qwen2_decoder_layer_impl.h
    npu_qwen3_decoder_layer_impl.h
    npu_rms_norm_impl.h
    npu_siglip_encoder_layer_impl.h
  SRCS
    npu_word_embedding_impl.cpp
    npu_pos_embedding_impl.cpp
    npu_lm_head_impl.cpp
    npu_qwen2dot5_vision_encoder_layer_impl.cpp
    npu_qwen3_vision_encoder_layer_impl.cpp
    npu_qwen3_moe_decoder_layer_impl.cpp
    # atb_parallel_linear.cpp
    npu_block_copy_impl.cpp
    buffer/atb_buffer.cpp
    buffer/atb_workspace.cpp
    npu_base_layer.cpp
    npu_column_parallel_linear_impl.cpp
    npu_glm4_moe_decoder_layer.cpp
    npu_deepseek_v2_decoder_layer_impl.cpp
    npu_llama_decoder_layer_impl.cpp
    npu_qwen2_decoder_layer_impl.cpp
    npu_qwen3_decoder_layer_impl.cpp
    npu_rms_norm_impl.cpp
    npu_siglip_encoder_layer_impl.cpp
  DEPS
    "-Wl,--whole-archive"
    "-Wl,--no-whole-archive"
    :base_layer
    :kv_cache
    :prefix_cache
    :block
    :eplb
    :parallel_state
    :state_dict
    glog::glog
    gflags::gflags
    spdlog::spdlog
    torch
    torch_npu
    xllm_kernels
)
